package com.ffox.controller;


import com.ffox.entity.StudentInformation;
import com.ffox.service.UserTeacherSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/userTeacherSubject")
public class UserTeacherSubjectController {
    @Autowired
    private UserTeacherSubjectService userTeacherSubjectService;

//    根据user_num找到teacher_id在获取教师所带班级列表
    @RequestMapping("/getClassByUserNum")
    public List<Map<String, Object>> getClassByUserNum(String userNum) {
        return userTeacherSubjectService.getClassByUserNum(userNum);
    }

//    根据class_id找到学生列表
    @RequestMapping("/getStudentsByClassId")
    public List<StudentInformation> getStudentsByClassId(Long classId) {
        return userTeacherSubjectService.getStudentsByClassId(classId);
    }

//

}
